#define _CRT_SECURE_NO_WARNINGS 1


#include "stackandQ.h"

int main()
{
	Stack st;
	StackInit(&st);

	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	StackPush(&st, 5);

	StackPrint(&st);
	
	printf("%d\n", StackTop(&st));
	StackPop(&st);
	StackPop(&st);
	StackPop(&st);

	StackPrint(&st);

	StackDestroy(&st);

	Queue q;
	QueueInit(&q);

	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);

	QueuePrint(&q);

	printf("%d\n", QueueBack(&q));

	QueuePop(&q);
	QueuePop(&q);	
	QueuePop(&q);
	QueuePop(&q);	
	QueuePop(&q);
	QueuePop(&q);

	QueuePrint(&q);

	QueueDestroy(&q);

	return 0;
}